#include "widget.h"
#include "ui_widget.h"
#include <QDebug>


Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    ui->label->setText("请选择性别：男");
    ui->male->setChecked(true);
    ui->other->setCheckable(false);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_male_clicked()
{
    ui->label->setText("请选择性别：男");
}

void Widget::on_female_clicked()
{
    ui->label->setText("请选择性别：女");
}

void Widget::on_other_clicked()
{
    ui->label->setText("请选择性别：其他");
}

void Widget::on_radioButton_clicked(bool checked)
{
    qDebug()<<"clicked:"<<checked;
}

void Widget::on_radioButton_3_pressed()
{
    qDebug()<<"pressed";
    //qDebug()<<ui->radioButton->isChecked();
}

void Widget::on_radioButton_2_released()
{
    qDebug()<<"released";
}

void Widget::on_radioButton_4_toggled(bool checked)
{
    qDebug()<<"toggled"<<checked;
}
